package router

import (
	"github.com/balance_foods/middleware"
	"github.com/gin-gonic/gin"
	"log"
)

var Router = gin.Default()

func Run() {
	Router.Use(middleware.Cors())
	Router.Static("/static", "upload")
	err := Router.Run(":8080")

	if err != nil {
		log.Fatalf("run err:%s", err.Error())
		return
	}
	log.Print("router run")
}
